from bam_counter.shared cimport strcmp

from bam_counter.counter cimport Counter, CounterRefIterator, CounterRow

ctypedef struct position_struct:
    char * ref
    int position

cdef class PositionsIter(object):
    cdef str _ref
    cdef int _position
    
    cdef cnext(self)

cdef class CharacterDelimitedPositionsReader(PositionsIter):
    cdef object _positions_file

cdef class PositionCountIterator(object):   
    cdef str _current_ref    
    cdef str _counter_ref    
    cdef int _current_position
    
    cdef PositionsIter _positions_iter
    
    cdef Counter _counter
    cdef CounterRefIterator _counter_iter 
    cdef CounterRow _current_row

    cdef _set_new_counter_ref(self)
    cdef _advance_current_row(self)
    cdef _advance_positions_iter(self)
    cdef _advance_positons_iter_to_next_ref(self)
